using terms from application "SEC Helper"
	
	on process invoke a_terminal
		tell a_terminal
			set w to make new option list dialog with properties {title:"realplayer control"}
			set item labels of w to {"play", "pause", "up", "down"}
			set value of w to 1
			push w
		end tell
	end process invoke
	
	on process dialog ok the_dialog
		tell application "SEC Helper"
			--show screen message value of the_dialog as string
			set cmd to value of the_dialog as string
			if cmd is "1" then
				show screen message "play realplay"
				tell application "RealPlayer"
					activate
					
					play
				end tell
			else if cmd is "2" then
				show screen message "pause realplay"
				
				tell application "RealPlayer"
					activate
					pause
				end tell
				
			else if cmd is "3" then
				show screen message "up"
				
				tell application "RealPlayer"
					set player volume to player volume + 5
				end tell
			else if cmd is "4" then
				show screen message "down"
				
				tell application "RealPlayer"
					set player volume to player volume - 5
				end tell
				
			end if
		end tell
		
	end process dialog ok
	
	on process dialog cancel the_dialog
		show screen message "cancelled"
	end process dialog cancel
	
end using terms from
